package com.quwan.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author quan
 * @date 2022-01-18 17:58
 */
@Getter
@AllArgsConstructor
public enum BalanceLogEnum {
    //交易类型 交易类型 0消费 1充值 2提现 3订单取消退回 4完成订单 5推广盈利 6派单支付 7派单取消 8派单接单
    CONSUME(0, "订单消费","-"),
    RECHARGE(1, "充值","+"),
    TRANS(2, "用户提现","-"),
    CANCEL_ORDER(3, "订单取消-退回","+"),
    FINISH_ORDER(4, "完成订单","+"),
    SPREAD_PROFIT(5, "推广盈利","+"),
    DISPATCH_PAY(6, "派单支付","-"),
    DISPATCH_CANCEL(7, "派单取消","+"),
    DISPATCH_FINISH(8, "派单接单","+");
    Integer type;
    String tips;
    String  symbol;

    public static BalanceLogEnum getByType(Integer type) {
        for (BalanceLogEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
